from gironimo.imagequery import Format, register_format


class GalleryDetailFormat(Format):
    def execute(self, query):
        return query.fit(650, 406).image_format('JPEG').query_name('gallery_detail')


class GalleryEditFormat(Format):
    def execute(self, query):
        return query.fit(100, 100).image_format('JPEG').query_name('gallery_edit')


class GalleryIndexFormat(Format):
    def execute(self, query):
        return query.fit(120, 120).image_format('JPEG').query_name('gallery_index')


register_format('gallery_detail', GalleryDetailFormat)
register_format('gallery_edit', GalleryEditFormat)
register_format('gallery_index', GalleryIndexFormat)

